<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/time/Time.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_798ee6f4f5cd9c6410c07a649b7662ec.html">time</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Time.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_time_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef __TIME_H__</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define __TIME_H__</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;../thread/SharedPtr.h&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;ctime&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">    9</a></span>&#160;<span class="keyword">typedef</span> <a class="code" href="tools_8h.html#a57be03562867144161c1bfee95ca8f7c">UINT64</a> <a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a>;</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="struct___date_time__.html">   14</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct___date_time__.html">_DateTime_</a></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;{</div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="struct___date_time__.html#a32e7ccea9d3dc302d33732590d4cf135">   16</a></span>&#160;    <span class="keywordtype">short</span> <a class="code" href="struct___date_time__.html#a32e7ccea9d3dc302d33732590d4cf135">nYear</a>;        </div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="struct___date_time__.html#af793ebd02d1fb80e8a158e55bf0e37d4">   17</a></span>&#160;    <span class="keywordtype">short</span> <a class="code" href="struct___date_time__.html#af793ebd02d1fb80e8a158e55bf0e37d4">nMonth</a>;       </div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="struct___date_time__.html#ac2704ddfabc5975f0686e43c832a3bd1">   18</a></span>&#160;    <span class="keywordtype">short</span> <a class="code" href="struct___date_time__.html#ac2704ddfabc5975f0686e43c832a3bd1">nDay</a>;         </div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="struct___date_time__.html#abd3b934f1eeb8c80bf9c6a785e15f78d">   19</a></span>&#160;    <span class="keywordtype">short</span> <a class="code" href="struct___date_time__.html#abd3b934f1eeb8c80bf9c6a785e15f78d">nHour</a>;        </div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="struct___date_time__.html#aa1c3e20e7fff603108490477541354b1">   20</a></span>&#160;    <span class="keywordtype">short</span> <a class="code" href="struct___date_time__.html#aa1c3e20e7fff603108490477541354b1">nMinute</a>;      </div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="struct___date_time__.html#ae87b74e64022b963abf57aeb8b89e2b1">   21</a></span>&#160;    <span class="keywordtype">short</span> <a class="code" href="struct___date_time__.html#ae87b74e64022b963abf57aeb8b89e2b1">nSecond</a>;      </div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="struct___date_time__.html#aff7925a416019a652ad284c233ad0c3b">   22</a></span>&#160;    <span class="keywordtype">short</span> <a class="code" href="struct___date_time__.html#aff7925a416019a652ad284c233ad0c3b">nMillisecond</a>; </div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="struct___date_time__.html#a9a2b0cf31499175a2180554891d3d3d8">   23</a></span>&#160;    <span class="keywordtype">short</span> <a class="code" href="struct___date_time__.html#a9a2b0cf31499175a2180554891d3d3d8">nReserved</a>;    </div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;}<a class="code" href="_time_8h.html#adbd5742d85c992f12de3113204c314fb">DateTime</a>,*<a class="code" href="_time_8h.html#af2a6744cb9d94e30fdd245a100a94ecf">PDateTime</a>;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="class_c_time_tools.html">   29</a></span>&#160;<span class="keyword">class </span><a class="code" href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a> <a class="code" href="class_c_time_tools.html">CTimeTools</a></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;{</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keyword">static</span> std::string GetDateTimeStr(<span class="keywordtype">int</span> chDate = <span class="charliteral">&#39;-&#39;</span>, <span class="keywordtype">int</span> chBoth = <span class="charliteral">&#39; &#39;</span>, <span class="keywordtype">int</span> chTime = <span class="charliteral">&#39;:&#39;</span>, <span class="keywordtype">int</span> chMill = <span class="charliteral">&#39;.&#39;</span>);</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keyword">static</span> std::string GetDateStr(<span class="keywordtype">int</span> chDate = <span class="charliteral">&#39;-&#39;</span>);</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keyword">static</span> std::string GetTimeStr(<span class="keywordtype">int</span> chTime = <span class="charliteral">&#39;:&#39;</span>, <span class="keywordtype">int</span> chMill = <span class="charliteral">&#39;.&#39;</span>);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keyword">static</span> tm* GetCTimeInfo(tm* tinfo);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keyword">static</span> <a class="code" href="struct___date_time__.html">PDateTime</a> GetTimeInfo(<a class="code" href="struct___date_time__.html">PDateTime</a> tinfo);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">long</span> GetDateValue(time_t *t);</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;};</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="class_c_time_base.html">   78</a></span>&#160;<span class="keyword">class </span><a class="code" href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a> <a class="code" href="class_c_time_base.html">CTimeBase</a></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;{</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73">   81</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73">TimeType</a></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    {</div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73a9e6af1eb7377cc41cd74c7abd6807bd6">   83</a></span>&#160;        <a class="code" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73a9e6af1eb7377cc41cd74c7abd6807bd6">real_time</a>,      <span class="comment">// 真实时间</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73ab4ca480006077aa183b9d7602b295a46">   84</a></span>&#160;        <a class="code" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73ab4ca480006077aa183b9d7602b295a46">machine_time</a>,   <span class="comment">// 机器时间</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73ae171ad68ea7b9ce8c876387c36b73ee8">   85</a></span>&#160;        unit_time       <span class="comment">// 时间长度</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    };</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="class_c_time_base.html#ae8e718574ad7db89751f71b4a05dfcda">   89</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="class_c_time_base.html#ae8e718574ad7db89751f71b4a05dfcda">~CTimeBase</a>() {}</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keyword">virtual</span> TimeType GetType() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> GetTime() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetTime(<a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> u64 = 0) = 0;           </div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="_shared_ptr_8h.html#a8db3747f9cfdc4b8f1387e270a054465">operator&lt; </a>(<span class="keyword">const</span> <a class="code" href="class_c_time_base.html">CTimeBase</a>&amp; Time) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="_shared_ptr_8h.html#aa822f917d3cfbe7ff07e89d9e04abcca">operator&gt; </a>(<span class="keyword">const</span> <a class="code" href="class_c_time_base.html">CTimeBase</a>&amp; Time) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="_shared_ptr_8h.html#a48875b62168863e5bfb1936094f07b57">operator&lt;= </a>(<span class="keyword">const</span> <a class="code" href="class_c_time_base.html">CTimeBase</a>&amp; Time) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="_shared_ptr_8h.html#a7f5139e4dc259565c1b3e2d43afd438e">operator&gt;= </a>(<span class="keyword">const</span> <a class="code" href="class_c_time_base.html">CTimeBase</a>&amp; Time) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="_shared_ptr_8h.html#a487b2a4e283823e794d829bf176e8092">operator== </a>(<span class="keyword">const</span> <a class="code" href="class_c_time_base.html">CTimeBase</a>&amp; Time) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> operator- (<span class="keyword">const</span> <a class="code" href="class_c_time_base.html">CTimeBase</a>&amp; Time) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> operator+ (<span class="keyword">const</span> <a class="code" href="class_c_time_base.html">CTimeBase</a>&amp; Time) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;};</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="class_c_sys_time.html">  124</a></span>&#160;<span class="keyword">class </span><a class="code" href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a> <a class="code" href="class_c_sys_time.html">CSysTime</a>:<span class="keyword">public</span> <a class="code" href="class_c_time_base.html">CTimeBase</a></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;{</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <a class="code" href="class_c_sys_time.html">CSysTime</a>();</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160; </div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <a class="code" href="class_c_sys_time.html">CSysTime</a>(<a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> t64);</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> <a class="code" href="class_c_time_base.html#a6667eccaa267178c72d64406484e5aff">GetTime</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160; </div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_time_base.html#a5421e3f57c65d50745c25ed381f86c58">SetTime</a>(<a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> t64 = 0);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160; </div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73">CTimeBase::TimeType</a> <a class="code" href="class_c_time_base.html#a7212bf7d0361a0136644701c1a562ce1">GetType</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="class_c_sys_time.html#abf4f52b7242a346eebaf97ddb965fb80">  143</a></span>&#160;    <a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> <a class="code" href="class_c_sys_time.html#abf4f52b7242a346eebaf97ddb965fb80">_dateTime</a>;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;};</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="class_c_machine_time.html">  149</a></span>&#160;<span class="keyword">class </span><a class="code" href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a> <a class="code" href="class_c_machine_time.html">CMachineTime</a>:<span class="keyword">public</span> <a class="code" href="class_c_time_base.html">CTimeBase</a></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;{</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <a class="code" href="class_c_machine_time.html">CMachineTime</a>();</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <a class="code" href="class_c_machine_time.html">CMachineTime</a>(<a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> t64);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73">TimeType</a> <a class="code" href="class_c_time_base.html#a7212bf7d0361a0136644701c1a562ce1">GetType</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> <a class="code" href="class_c_time_base.html#a6667eccaa267178c72d64406484e5aff">GetTime</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_time_base.html#a5421e3f57c65d50745c25ed381f86c58">SetTime</a>(<a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> t64 = 0);</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="class_c_machine_time.html#a2912c9f3c5e338bc2c7b38f9b945c868">  163</a></span>&#160;    <a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> <a class="code" href="class_c_machine_time.html#a2912c9f3c5e338bc2c7b38f9b945c868">_u64Time</a>;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;};</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160; </div>
<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="class_c_unit_time.html">  170</a></span>&#160;<span class="keyword">class </span><a class="code" href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a> <a class="code" href="class_c_unit_time.html">CUnitTime</a> :<span class="keyword">public</span> <a class="code" href="class_c_time_base.html">CTimeBase</a></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;{</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <a class="code" href="class_c_unit_time.html">CUnitTime</a>();</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <a class="code" href="class_c_unit_time.html">CUnitTime</a>(<a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> t64);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73">TimeType</a> <a class="code" href="class_c_time_base.html#a7212bf7d0361a0136644701c1a562ce1">GetType</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> <a class="code" href="class_c_time_base.html#a6667eccaa267178c72d64406484e5aff">GetTime</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_time_base.html#a5421e3f57c65d50745c25ed381f86c58">SetTime</a>(<a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> t64);</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="class_c_unit_time.html#a60983a7d989c54ffab6a5beb10196b86">  183</a></span>&#160;    <a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> <a class="code" href="class_c_unit_time.html#a60983a7d989c54ffab6a5beb10196b86">_u64Time</a>;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;};</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160; </div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="class_c_time_factory.html">  189</a></span>&#160;<span class="keyword">class </span><a class="code" href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a> <a class="code" href="class_c_time_factory.html">CTimeFactory</a></div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;{</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <span class="keyword">static</span> <a class="code" href="class_shared_ptr.html">SharedPtr&lt;CTimeBase&gt;</a> CreateInstance(<a class="code" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73">CTimeBase::TimeType</a> type);</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <span class="keyword">static</span> <a class="code" href="class_shared_ptr.html">SharedPtr&lt;CTimeBase&gt;</a> CreateInstance(<a class="code" href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73">CTimeBase::TimeType</a> type, <a class="code" href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a> t);</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;};</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160; </div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;<span class="preprocessor">#endif // __TIME_H__</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_c_machine_time_html_a2912c9f3c5e338bc2c7b38f9b945c868"><div class="ttname"><a href="class_c_machine_time.html#a2912c9f3c5e338bc2c7b38f9b945c868">CMachineTime::_u64Time</a></div><div class="ttdeci">TIME_T _u64Time</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00163">Time.h:163</a></div></div>
<div class="ttc" id="a_time_8h_html_ace04e42edcaa8586d6e07a7a86fbc522"><div class="ttname"><a href="_time_8h.html#ace04e42edcaa8586d6e07a7a86fbc522">TIME_T</a></div><div class="ttdeci">DEF_BEG_LIBTOOLS typedef UINT64 TIME_T</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00009">Time.h:9</a></div></div>
<div class="ttc" id="aclass_c_time_base_html_a045344374dbd744e3bc839b31d552b73ab4ca480006077aa183b9d7602b295a46"><div class="ttname"><a href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73ab4ca480006077aa183b9d7602b295a46">CTimeBase::machine_time</a></div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00084">Time.h:84</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html"><div class="ttname"><a href="class_shared_ptr.html">SharedPtr</a></div><div class="ttdoc">智能指针</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00119">SharedPtr.h:119</a></div></div>
<div class="ttc" id="aclass_c_sys_time_html_abf4f52b7242a346eebaf97ddb965fb80"><div class="ttname"><a href="class_c_sys_time.html#abf4f52b7242a346eebaf97ddb965fb80">CSysTime::_dateTime</a></div><div class="ttdeci">TIME_T _dateTime</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00143">Time.h:143</a></div></div>
<div class="ttc" id="aclass_c_time_base_html"><div class="ttname"><a href="class_c_time_base.html">CTimeBase</a></div><div class="ttdoc">时间基类</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00078">Time.h:78</a></div></div>
<div class="ttc" id="aclass_c_unit_time_html_a60983a7d989c54ffab6a5beb10196b86"><div class="ttname"><a href="class_c_unit_time.html#a60983a7d989c54ffab6a5beb10196b86">CUnitTime::_u64Time</a></div><div class="ttdeci">TIME_T _u64Time</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00183">Time.h:183</a></div></div>
<div class="ttc" id="a_time_8h_html_af2a6744cb9d94e30fdd245a100a94ecf"><div class="ttname"><a href="_time_8h.html#af2a6744cb9d94e30fdd245a100a94ecf">PDateTime</a></div><div class="ttdeci">struct _DateTime_ * PDateTime</div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="atools_8h_html_a64152c8b939d1ce06c7c5cb6c97b62f8"><div class="ttname"><a href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a></div><div class="ttdeci">#define LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00095">tools.h:95</a></div></div>
<div class="ttc" id="a_shared_ptr_8h_html_aa822f917d3cfbe7ff07e89d9e04abcca"><div class="ttname"><a href="_shared_ptr_8h.html#aa822f917d3cfbe7ff07e89d9e04abcca">operator&gt;</a></div><div class="ttdeci">bool operator&gt;(const SharedPtr&lt; Ty1 &gt; &amp;_Left, const SharedPtr&lt; Ty2 &gt; &amp;_Right)</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00323">SharedPtr.h:323</a></div></div>
<div class="ttc" id="aclass_c_time_factory_html"><div class="ttname"><a href="class_c_time_factory.html">CTimeFactory</a></div><div class="ttdoc">时间类工厂</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00189">Time.h:189</a></div></div>
<div class="ttc" id="aclass_c_time_base_html_a045344374dbd744e3bc839b31d552b73"><div class="ttname"><a href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73">CTimeBase::TimeType</a></div><div class="ttdeci">TimeType</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00081">Time.h:81</a></div></div>
<div class="ttc" id="a_shared_ptr_8h_html_a48875b62168863e5bfb1936094f07b57"><div class="ttname"><a href="_shared_ptr_8h.html#a48875b62168863e5bfb1936094f07b57">operator&lt;=</a></div><div class="ttdeci">bool operator&lt;=(const SharedPtr&lt; Ty1 &gt; &amp;_Left, const SharedPtr&lt; Ty2 &gt; &amp;_Right)</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00331">SharedPtr.h:331</a></div></div>
<div class="ttc" id="astruct___date_time___html"><div class="ttname"><a href="struct___date_time__.html">_DateTime_</a></div><div class="ttdoc">时间结构体</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00014">Time.h:14</a></div></div>
<div class="ttc" id="astruct___date_time___html_a9a2b0cf31499175a2180554891d3d3d8"><div class="ttname"><a href="struct___date_time__.html#a9a2b0cf31499175a2180554891d3d3d8">_DateTime_::nReserved</a></div><div class="ttdeci">short nReserved</div><div class="ttdoc">字节对齐保留</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00023">Time.h:23</a></div></div>
<div class="ttc" id="astruct___date_time___html_abd3b934f1eeb8c80bf9c6a785e15f78d"><div class="ttname"><a href="struct___date_time__.html#abd3b934f1eeb8c80bf9c6a785e15f78d">_DateTime_::nHour</a></div><div class="ttdeci">short nHour</div><div class="ttdoc">时</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00019">Time.h:19</a></div></div>
<div class="ttc" id="aclass_c_unit_time_html"><div class="ttname"><a href="class_c_unit_time.html">CUnitTime</a></div><div class="ttdoc">时间单位类 以毫秒为单位的一个时间度量</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00170">Time.h:170</a></div></div>
<div class="ttc" id="aclass_c_time_base_html_a045344374dbd744e3bc839b31d552b73a9e6af1eb7377cc41cd74c7abd6807bd6"><div class="ttname"><a href="class_c_time_base.html#a045344374dbd744e3bc839b31d552b73a9e6af1eb7377cc41cd74c7abd6807bd6">CTimeBase::real_time</a></div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00083">Time.h:83</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="aclass_c_time_base_html_a6667eccaa267178c72d64406484e5aff"><div class="ttname"><a href="class_c_time_base.html#a6667eccaa267178c72d64406484e5aff">CTimeBase::GetTime</a></div><div class="ttdeci">virtual TIME_T GetTime() const =0</div><div class="ttdoc">返回整型时间</div></div>
<div class="ttc" id="astruct___date_time___html_aa1c3e20e7fff603108490477541354b1"><div class="ttname"><a href="struct___date_time__.html#aa1c3e20e7fff603108490477541354b1">_DateTime_::nMinute</a></div><div class="ttdeci">short nMinute</div><div class="ttdoc">分</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00020">Time.h:20</a></div></div>
<div class="ttc" id="aclass_c_sys_time_html"><div class="ttname"><a href="class_c_sys_time.html">CSysTime</a></div><div class="ttdoc">系统时间类 系统时间以整型的方式传入</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00124">Time.h:124</a></div></div>
<div class="ttc" id="aclass_c_time_base_html_a7212bf7d0361a0136644701c1a562ce1"><div class="ttname"><a href="class_c_time_base.html#a7212bf7d0361a0136644701c1a562ce1">CTimeBase::GetType</a></div><div class="ttdeci">virtual TimeType GetType() const =0</div><div class="ttdoc">返回时间类型</div></div>
<div class="ttc" id="astruct___date_time___html_a32e7ccea9d3dc302d33732590d4cf135"><div class="ttname"><a href="struct___date_time__.html#a32e7ccea9d3dc302d33732590d4cf135">_DateTime_::nYear</a></div><div class="ttdeci">short nYear</div><div class="ttdoc">年</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00016">Time.h:16</a></div></div>
<div class="ttc" id="astruct___date_time___html_aff7925a416019a652ad284c233ad0c3b"><div class="ttname"><a href="struct___date_time__.html#aff7925a416019a652ad284c233ad0c3b">_DateTime_::nMillisecond</a></div><div class="ttdeci">short nMillisecond</div><div class="ttdoc">毫秒</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00022">Time.h:22</a></div></div>
<div class="ttc" id="astruct___date_time___html_af793ebd02d1fb80e8a158e55bf0e37d4"><div class="ttname"><a href="struct___date_time__.html#af793ebd02d1fb80e8a158e55bf0e37d4">_DateTime_::nMonth</a></div><div class="ttdeci">short nMonth</div><div class="ttdoc">月</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00017">Time.h:17</a></div></div>
<div class="ttc" id="a_shared_ptr_8h_html_a487b2a4e283823e794d829bf176e8092"><div class="ttname"><a href="_shared_ptr_8h.html#a487b2a4e283823e794d829bf176e8092">operator==</a></div><div class="ttdeci">bool operator==(const SharedPtr&lt; Ty1 &gt; &amp;_Left, const SharedPtr&lt; Ty2 &gt; &amp;_Right)</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00291">SharedPtr.h:291</a></div></div>
<div class="ttc" id="atools_8h_html_a57be03562867144161c1bfee95ca8f7c"><div class="ttname"><a href="tools_8h.html#a57be03562867144161c1bfee95ca8f7c">UINT64</a></div><div class="ttdeci">unsigned long long UINT64</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00130">tools.h:130</a></div></div>
<div class="ttc" id="a_shared_ptr_8h_html_a7f5139e4dc259565c1b3e2d43afd438e"><div class="ttname"><a href="_shared_ptr_8h.html#a7f5139e4dc259565c1b3e2d43afd438e">operator&gt;=</a></div><div class="ttdeci">bool operator&gt;=(const SharedPtr&lt; Ty1 &gt; &amp;_Left, const SharedPtr&lt; Ty2 &gt; &amp;_Right)</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00315">SharedPtr.h:315</a></div></div>
<div class="ttc" id="aclass_c_time_base_html_ae8e718574ad7db89751f71b4a05dfcda"><div class="ttname"><a href="class_c_time_base.html#ae8e718574ad7db89751f71b4a05dfcda">CTimeBase::~CTimeBase</a></div><div class="ttdeci">virtual ~CTimeBase()</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00089">Time.h:89</a></div></div>
<div class="ttc" id="aclass_c_time_base_html_a5421e3f57c65d50745c25ed381f86c58"><div class="ttname"><a href="class_c_time_base.html#a5421e3f57c65d50745c25ed381f86c58">CTimeBase::SetTime</a></div><div class="ttdeci">virtual void SetTime(TIME_T u64=0)=0</div><div class="ttdoc">设置时间</div></div>
<div class="ttc" id="a_time_8h_html_adbd5742d85c992f12de3113204c314fb"><div class="ttname"><a href="_time_8h.html#adbd5742d85c992f12de3113204c314fb">DateTime</a></div><div class="ttdeci">struct _DateTime_ DateTime</div><div class="ttdoc">时间结构体</div></div>
<div class="ttc" id="aclass_c_machine_time_html"><div class="ttname"><a href="class_c_machine_time.html">CMachineTime</a></div><div class="ttdoc">机器时间类</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00149">Time.h:149</a></div></div>
<div class="ttc" id="astruct___date_time___html_ae87b74e64022b963abf57aeb8b89e2b1"><div class="ttname"><a href="struct___date_time__.html#ae87b74e64022b963abf57aeb8b89e2b1">_DateTime_::nSecond</a></div><div class="ttdeci">short nSecond</div><div class="ttdoc">秒</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00021">Time.h:21</a></div></div>
<div class="ttc" id="aclass_c_time_tools_html"><div class="ttname"><a href="class_c_time_tools.html">CTimeTools</a></div><div class="ttdoc">时间工具类</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00029">Time.h:29</a></div></div>
<div class="ttc" id="a_shared_ptr_8h_html_a8db3747f9cfdc4b8f1387e270a054465"><div class="ttname"><a href="_shared_ptr_8h.html#a8db3747f9cfdc4b8f1387e270a054465">operator&lt;</a></div><div class="ttdeci">bool operator&lt;(const SharedPtr&lt; Ty1 &gt; &amp;_Left, const SharedPtr&lt; Ty2 &gt; &amp;_Right)</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00307">SharedPtr.h:307</a></div></div>
<div class="ttc" id="astruct___date_time___html_ac2704ddfabc5975f0686e43c832a3bd1"><div class="ttname"><a href="struct___date_time__.html#ac2704ddfabc5975f0686e43c832a3bd1">_DateTime_::nDay</a></div><div class="ttdeci">short nDay</div><div class="ttdoc">日</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00018">Time.h:18</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
